import * as express from 'express'
import noticesController from '../../controllers/noticesController'

const router = express.Router()

// 创建
router.post('/create', noticesController.createNotices)
// 查询
router.post('/search', noticesController.findByNameKeyAndSubscriber)
// 删除
router.delete('/:id', noticesController.deleteNotices)
// 获取接收者所能查看的最新一条公告
router.get('/new/:subscriber', noticesController.getNewNotices)
// 获取用户的公告，（例如：教师角色的所有可查看的公告）
router.post('/mynotices', noticesController.getRoleNotice)

export default router